const RootView = () => import(/* webpackChunkName: "rootView" */  '~/views/RootView');
const SafetyManagement = () => import(/* webpackChunkName: "SafetyManagement" */ '~/views/SafetyManagement');
const AnalysisReport = () => import(/* webpackChunkName: "AnalysisReport" */ '~/views/AnalysisReport');
const SafetyTechnology = () => import(/* webpackChunkName: "SafetyTechnology" */ '~/views/SafetyTechnology');
const WarningManagement = () => import(/* webpackChunkName: "WarningManagement" */ '~/views/WarningManagement');
const SystemManagement = () => import(/* webpackChunkName: "SystemManagement" */ '~/views/SystemManagement');
const MonitorControl = () => import(/* webpackChunkName: "MonitorControl" */ "./views/MonitorControl");
const Login = () => import(/* webpackChunkName: "Login" */ '~/views/Login.vue');
const Index = () => import("~/views/Index");
const EmptyRouter = () => import(/* webpackChunkName: "EmptyRouter" */ "~/components/EmptyRouter");
const BasicInformation = () => import(/* webpackChunkName: "BasicInformation" */ '~/views/BasicInformation');


export const PLATFORM_KEY = 'enterprise';
export const ROOT = '/:' + PLATFORM_KEY;
export const LOGIN = 'login';
export const INDEX = 'index';
export const BASIC_INFORMATION = 'basic-information';
export const SECURITY_MANAGEMENT = 'security-management';
export const MONITORING = 'monitoring';
export const WARNING_MANAGEMENT = 'warning-management';
export const SAFETY_TECHNOLOGY = 'safety-technology';
export const ANALYSIS_REPORT = 'analysis-report';
export const SYSTEM_MANAGEMENT = 'system-management';

const routers = [
    {
        path: ROOT,
        component: EmptyRouter,
        children: [
            {
                path: LOGIN,
                component: Login,
                name: LOGIN
            }, {
                path: INDEX,
                name: INDEX,
                component: Index
            },
            {
                path: '',
                component: RootView,
                redirect: {
                    name: LOGIN
                },
                children: [
                    {
                        path: BASIC_INFORMATION,
                        name: BASIC_INFORMATION,
                        component: BasicInformation
                    },
                    {
                        path: SECURITY_MANAGEMENT,
                        name: SECURITY_MANAGEMENT,
                        component: SafetyManagement
                    },
                    {
                        path: MONITORING,
                        name: MONITORING,
                        component: MonitorControl
                    },
                    {
                        path: WARNING_MANAGEMENT,
                        name: WARNING_MANAGEMENT,
                        component: WarningManagement
                    },
                    {
                        path: SAFETY_TECHNOLOGY,
                        name: SAFETY_TECHNOLOGY,
                        component: SafetyTechnology
                    },
                    {
                        path: ANALYSIS_REPORT,
                        name: ANALYSIS_REPORT,
                        component: AnalysisReport
                    },
                    {
                        path: SYSTEM_MANAGEMENT,
                        name: SYSTEM_MANAGEMENT,
                        component: SystemManagement
                    }
                ]
            }
        ]
    }
]


export default routers
